﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="Stylesheet" type="text/css" media="screen" href="Screen.css" />
  <title>STP_CALLBACKS</title>
</head>
<body>
	<h3>STP_CALLBACKS</h3>
	<hr />
<pre>
struct STP_CALLBACKS
{
    STP_CALLBACK_ENABLE_LEARNING          enableLearning;
    STP_CALLBACK_ENABLE_FORWARDING        enableForwarding;
    STP_CALLBACK_TRANSMIT_GET_BUFFER      transmitGetBuffer;
    STP_CALLBACK_TRANSMIT_RELEASE_BUFFER  transmitReleaseBuffer;
    STP_CALLBACK_FLUSH_FDB                flushFdb;
    STP_CALLBACK_DEBUG_STR_OUT            debugStrOut;
    STP_CALLBACK_ON_TOPOLOGY_CHANGED      onTopologyChanged;
    STP_CALLBACK_ALLOC_AND_ZERO_MEMORY    allocAndZeroMemory;
    STP_CALLBACK_FREE_MEMORY              freeMemory;
};</pre>
	<h4>
		Summary</h4>
	<p>
		Structure containing pointers to application-defined STP callbacks. These callbacks 
		implement the hardware-specific and platform-specific functionality required by STP, such 
		as enabling forwarding on a physical port, or allocating memory, or displaying debug text 
		generated by the STP library.</p>
	<h4>
		Members</h4>
	<dl>
		<dt>enableLearning</dt>
		<dd>See <a href="StpCallback_EnableLearning.html">StpCallback_EnableLearning</a>.</dd>
		<dt>enableForwarding</dt>
		<dd>See <a href="StpCallback_EnableForwarding.html">StpCallback_EnableForwarding</a>.</dd>
		<dt>transmitGetBuffer</dt>
		<dd>See <a href="StpCallback_TransmitGetBuffer.html">StpCallback_TransmitGetBuffer</a>.</dd>
		<dt>transmitReleaseBuffer</dt>
		<dd>See <a href="StpCallback_TransmitReleaseBuffer.html">StpCallback_TransmitReleaseBuffer</a>.</dd>
		<dt>flushFdb</dt>
		<dd>See <a href="StpCallback_FlushFdb.html">StpCallback_FlushFdb</a>.</dd>
		<dt>debugStrOut</dt>
		<dd>See <a href="StpCallback_DebugStrOut.html">StpCallback_DebugStrOut</a>.</dd>
		<dt>onTopologyChanged</dt>
		<dd>See <a href="StpCallback_OnTopologyChanged.html">StpCallback_OnTopologyChanged</a></dd>
		<dt>allocAndZeroMemory</dt>
		<dd>See <a href="StpCallback_AllocAndZeroMemory.html">StpCallback_AllocAndZeroMemory</a>.</dd>
		<dt>freeMemory</dt>
		<dd>See <a href="StpCallback_FreeMemory.html">StpCallback_FreeMemory</a>.</dd>
	</dl>
	<h4>
		Remarks</h4>
	<p>
		All these callbacks are called from within library functions such as <a href="STP_CreateBridge.html">
			STP_CreateBridge</a>, <a href="STP_SetPortPriority.html">STP_SetPortPriority</a>,
		<a href="STP_OnBpduReceived.html">STP_OnBpduReceived</a> etc. With other words,
		first the application calls some library function, then that function calls application&#39;s
		STP callbacks to do hardware-specific work, and then the function returns.</p>
	<p>
			Unless explicitly permitted,
			STP library functions may not be called from within these callbacks.</p>
	
</body>
</html>
